<?php
/**
 * @ Fmash Top System
 * @ version: 3.0
 * @ author: i.coffee.smile@mail.com
 * @ date:2011-1-29
 * @ file:admin_del.php $33
 */
include_once 'class_mysql.php';
include_once 'function.php';
if($_COOKIE['DOS'] != 'Fmash' || $_COOKIE['FMASH'] != 'Happy' || !isset($_GET['class']))
{
	exit('please login user for admin! -thanks by fmash!');
}

if($_GET['class'] == 'comment')
{
	if(isset($_GET['cid']))
	{
		$cid = $_GET['cid'];
		$sql1 = "DELETE FROM `$top_comment` WHERE `cid` = '$cid';";
		$sql2 = "DELETE FROM `$top_comment_content` WHERE `cid` = '$cid';";
		echo $sql1."<br>";
		echo $sql2."<br>";
		if(mysql_query($sql1))
		{
			if(isset($_GET['from']))
			{
				$url = de_url($_GET['from']);
				header("location:$url");
			}
			echo '删除成功上述语句1<br>';
		}
		if(mysql_query($sql2))
		{
			echo '删除成功上述语句2<br>';
		}
	}else{
		exit('请置cid');
	}
}elseif($_GET['class'] == 'tag'){
	if(isset($_GET['tid']))
	{
		$tid = $_GET['tid'];
		$sql = "DELETE FROM `$top_man_tag` WHERE `tagid` = '$tid';";
		echo $sql."<br>";
		if(mysql_query($sql))
		{
			if(isset($_GET['from']))
			{
				$url = de_url($_GET['from']);
				header("location:$url");
			}
			echo '删除成功上述语句<br>';
		}
	}else{
		exit('请置cid');
	}
}else{
	exit('其他功能暂无！');
}